package com.gameserver.models.battleship;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.gameserver.models.Game;
import com.gameserver.models.dto.BattleShipDto;
//obvious will be filled up once coded 
@Entity
@Table(name="Battleship")
public class BattleShip extends Game{
	//store grid info
	//store relation to history
	//store player info, will be a join between player table not flat string
	private String player1Id;
	private String player2Id;
	
	public BattleShip(String player1Id, String player2Id){
		super(Game.GameType.BATTLESHIP);
		this.player1Id = player1Id;
		this.player2Id = player2Id;
	}
	
	public BattleShipDto read(){
		BattleShipDto dto = new BattleShipDto();
		dto.setGameId(getGameId());
		dto.setGameStatus(getGameStatus().toString());
		dto.setGameType(getGameType().toString());
		dto.setPlayer1(player1Id);
		dto.setPlayer2(player2Id);
		return dto;
	}

	public String getPlayer1Id() {
		return player1Id;
	}

	public void setPlayer1Id(String player1Id) {
		this.player1Id = player1Id;
	}

	public String getPlayer2Id() {
		return player2Id;
	}

	public void setPlayer2Id(String player2Id) {
		this.player2Id = player2Id;
	}
}
